package org.mineground.commands.irc;

import org.jibble.pircbot.Colors;
import org.jibble.pircbot.User;
import org.mineground.Main;
import org.mineground.handlers.irc.CommandExecutor;
import org.mineground.handlers.irc.UserLevel;

/**
 *
 * @file ReloadMessages.java (2012)
 * @author Daniel Koenen
 * 
 */
public class ReloadMessages implements CommandExecutor {
    @Override
    public void onCommand(User sender, UserLevel level, String channel, String command, String arguments[]) {
	if (level.compareTo(UserLevel.IRC_SOP) < 0) {
	    return;
        }
        
        Main.getInstance().getRandomMessageSender().reloadMessages();
        Main.getInstance().getIRCHandler().sendMessage(channel, Colors.BLUE + "* Announced messages have been reloaded");
    }
}
